package frontend.parser.syntaxtree;

import frontend.parser.syntaxtree.symbol.NonTerminalSymbol;
import frontend.parser.syntaxtree.symbol.TerminalSymbol;

import java.util.function.Consumer;

/**
 * lOrExp
 * @author 杨凯伟
 * @date 2024/10/14
 */
public class CondNode extends SyntaxNode {
    public LOrExpNode lOrExp;

    @Override
    public void walk(Consumer<TerminalSymbol> terConsumer, Consumer<NonTerminalSymbol> nonTerConsumer) {
        lOrExp.walk(terConsumer, nonTerConsumer);
        nonTerConsumer.accept(new NonTerminalSymbol(this));
    }

    @Override
    public String getType() {
        return "Cond";
    }
}
